package cate.game.role.farm.pk.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBPK;
import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "切磋 の 请求")
public class PkChallengeReq implements MsgInput {

	@NoteField("切磋的玩家的uid")
	public String roleUid;

	@NoteField("玩家区服id")
	public int srvId;

	@Override
	public void execute(GameBody game, ClientContext cc) {
		EcResult r = cc.getRole().getFarm().pk.challenge(roleUid, srvId);
		game.notice.message(cc.getRole(), r, true);
	}


	@Override
	public MsgConfig conf() {
		return MsgIdBPK.CHALLENGE_REQ;
	}
}
